/* 设置 HTML 变量 */
export function setHtmlProperty(key: string, value: string) {
  document.documentElement.style.setProperty(key, value)
}
export function removeHtmlProperty(key: string) {
  document.documentElement.style.removeProperty(key)
}

export function cloneDeep(data) {
  return JSON.parse(JSON.stringify(data))
}

export function isFunction(value: any) {
  return typeof value === 'function'
}

export function isString(value: any) {
  return typeof value === 'string'
}

export function isBoolean(value: any) {
  return typeof value === 'boolean'
}

export function isEmpty(value: any) {
  return value === null || !Object.keys(value)?.length
}
